#include "../include/display.h"

// 构造函数定义
Display::Display(float size, const std::string &model)
    : size(size), model(model) {}

Display::Display(): Display(11.6, "super") {}

// 将属性写入文件的方法
void Display::writeToFile(std::ofstream &file) {
    if (file.is_open()) {
        file << "显示器：" << std::endl;
        file << " Size: " << size << std::endl;
        file << " Tmodel: " << model << std::endl;
    }
}

// 打印属性的方法
void Display::print() const {
    std::cout << "显示器：" << std::endl;
    std::cout << " Size: " << size << std::endl;
    std::cout << " model: " << model << std::endl;
}